package com.ruoyi.community.mapper;

import java.util.List;
import com.ruoyi.community.domain.MessageAnnounce;
import org.apache.ibatis.annotations.Param;

/**
 * 【请填写功能名称】Mapper接口
 * 
 * @author ruoyi
 * @date 2021-12-20
 */
public interface MessageAnnounceMapper 
{

    public List<MessageAnnounce> selectMessageAnnounceList(MessageAnnounce messageAnnounce);

    public int updateMessageAnnounce(MessageAnnounce messageAnnounce);

    public int deleteMessageAnnounceById(Long id);

    public int deleteMessageAnnounceByIds(Long[] ids);

    // 插入公告信息
    public Long insertMessageAnnounce(MessageAnnounce messageAnnounce);

    // 查询已读和未读最近一条公告id，然后得到未读的公告
    public List<Long> getLatestAnnounce(@Param("communityId") int communityId, @Param("userId") Long userId);

    // 根据id查公告内容
    public MessageAnnounce selectMessageAnnounceById(Long id);
}
